package com.sky.controller;

import com.sky.pojo.User;
import com.sky.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class UserController {

    @Autowired
    private UserService service;

    @RequestMapping("/getAll.do")
    public String getAll(HttpServletRequest request){
        List<User> users= service.getAll();
        request.setAttribute("users",users);
        System.out.println("hhh");
        System.out.println("aaa");        System.out.println("aaa");
        System.out.println("bbb");


        System.out.println("james-dev");
        System.out.println("james111");
        System.out.println("master123");

        System.out.println("提交成功");

         System.out.println("james提交");

         System.out.println("111");



        return "forward:/index.jsp";
    }



}
